﻿using System.ComponentModel.DataAnnotations;

namespace FlyingHat.Core.Entities
{
    /// <summary>
    /// 书籍分类
    /// </summary>
    public class Classification : BaseEntity
    {
        /// <summary>
        /// 分类号
        /// </summary>
        [Required, StringLength(10)]
        public string Code { get; set; } = string.Empty;

        /// <summary>
        /// 分类名称
        /// </summary>
        [Required, StringLength(50)]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 父级ID
        /// </summary>
        public long ParentId { get; set; }

        public int Sort { get; set; }
    }
}
